Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zellij/0.41.2-r1: cve remediation #35025

Closed
wants to merge 3 commits into from

Conversation

octo-sts[bot]
Copy link
Contributor

@octo-sts octo-sts bot commented Nov 22, 2024

Remediates: GHSA-c2f5-jxjv-2hh8. The other two findings in the CI CVE scan are not related to this CVE fix.


zellij/0.41.2-r1: fix GHSA-c2f5-jxjv-2hh8

Advisory data: https://github.com/wolfi-dev/advisories/blob/main/zellij.advisories.yaml

Copy link
Contributor Author

octo-sts bot commented Nov 22, 2024

Gen AI suggestions to solve the build error:

• Detected Error:

error: failed to select a version for the requirement `wasmtime = "^21.0.2"`
candidate versions found which didn't match: 24.0.2
location searched: crates.io index
required by package `zellij-server v0.41.2`

• Error Category: Dependency/Version

• Failure Point: rust/cargobump step when attempting to update the wasmtime dependency

• Root Cause Analysis: The cargobump tool is trying to update wasmtime to a newer version, but zellij-server specifically requires wasmtime 21.0.2, while only version 24.0.2 is available in the crates.io index.

• Suggested Fix:
Add wasmtime to the exclusion list in cargobump-deps.yaml:

exclude:
  - wasmtime

• Explanation:
The failure occurs because wasmtime 21.0.2 is a hard requirement for zellij-server 0.41.2, but cargobump is trying to update it to 24.0.2. By excluding wasmtime from the automatic updates, we preserve the required version compatibility while allowing other dependencies to update safely.

• Additional Notes:

  • This is a common issue when a package has strict version requirements for critical dependencies
  • Wasmtime has significant breaking changes between major versions
  • The exclusion approach is safer than forcing an upgrade that could break functionality

• References:

Copy link
Contributor Author

octo-sts bot commented Nov 26, 2024

Gen AI suggestions to solve the build error:

• Detected Error:

error: failed to select a version for the requirement `wasmtime = "^21.0.2"`
candidate versions found which didn't match: 25.0.0
location searched: crates.io index
required by package `zellij-server v0.41.2`

• Error Category: Dependency Version Conflict

• Failure Point: rust/cargobump step during dependency update

• Root Cause Analysis: The package requires wasmtime v21.0.2, but this version is no longer available in crates.io. The only available version is 25.0.0, which is incompatible with the current package version.

• Suggested Fix:

  1. Add a version override in the cargobump-deps.yaml file:
dependencies:
  - name: wasmtime
    version: "25.0.0"
  1. Or pin the specific version in the pipeline:
  - uses: rust/cargobump
    with:
      packages:
        - [email protected]

• Explanation: The wasmtime dependency has undergone a major version update from 21.x to 25.x. Since this is a breaking change, we need to explicitly specify the version compatibility. The fix will allow the build system to use the newer version of wasmtime.

• Additional Notes:

  • This may require additional code changes due to breaking API changes between wasmtime 21 and 25
  • Consider opening an upstream issue to update the wasmtime dependency
  • Test thoroughly as this is a major version jump

• References:

@mamccorm mamccorm force-pushed the cve-zellij-7a539ba262f5b00def3bf7f70ed3fc87 branch from 810359e to 6afd537 Compare December 30, 2024 14:54
Copy link
Contributor Author

octo-sts bot commented Dec 30, 2024

Gen AI suggestions to solve the build error:

Based on the build error log, I'll help analyze and resolve the issue:

• Detected Error: "2024/12/30 14:56:40 INFO Update package: cap-primitives" (followed by build failure)

• Error Category: Dependency

• Failure Point: During the rust/cargobump step

• Root Cause Analysis: The cargobump tool is detecting outdated dependencies but appears to be failing silently. The error occurs during dependency version bumping, likely due to incompatible version constraints or missing cargobump configuration.

• Suggested Fix:

  1. Add a cargobump-deps.yaml file to specify dependency versions:
# cargobump-deps.yaml
dependencies:
  - name: cap-primitives
    version: "=1.0.1"  # Use explicit version
  1. Or modify the melange.yaml to skip cargobump:
pipeline:
  - uses: git-checkout
    with:
      repository: https://github.com/zellij-org/zellij
      tag: v${{package.version}}
      expected-commit: 40d49737d126eef60dd988f1fe60df4c42d23773

  # Remove or comment out the cargobump step
  # - uses: rust/cargobump

• Explanation: The cargobump tool is trying to update Rust dependencies but failing. Since we're building a specific tagged version (v0.41.2), we should either properly configure cargobump or skip it entirely to maintain the exact dependencies specified in the original Cargo.lock file.

• Additional Notes:

  • Removing cargobump is safer for reproducible builds
  • If security updates are needed, they should be handled through proper version bumps
  • The package version (0.41.2) is recent enough that dependency updates may not be critical

• References:

@octo-sts octo-sts bot added the bincapz/pass bincapz/pass Bincapz (aka. malcontent) scan didn't detect any CRITICALs on the scanned packages. label Dec 30, 2024
@mamccorm mamccorm requested review from kbsteere and a team and removed request for a team December 30, 2024 18:11
@mamccorm mamccorm marked this pull request as draft December 30, 2024 20:49
@mamccorm
Copy link
Member

The vuln looks to affect windows, so this may turn out to be an advisory vs a requirement to bump. I did file this with the upstream maintainers, who also noted that while they leverage wasmtime, zellij itself doesn't support windows:

@mamccorm
Copy link
Member

mamccorm commented Jan 2, 2025

@mamccorm
Copy link
Member

mamccorm commented Jan 2, 2025

closing, advisory raised:
wolfi-dev/advisories#11060

@mamccorm mamccorm closed this Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automated pr bincapz/pass bincapz/pass Bincapz (aka. malcontent) scan didn't detect any CRITICALs on the scanned packages. GHSA-c2f5-jxjv-2hh8 request-cve-remediation rust/cargobump zellij/0.41.2-r1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants